package com.example.design_pattern.responsibility_chain;

public class JiaZheng extends Player {

    public JiaZheng(){

    }

    public JiaZheng(Player player){
        setmSuccessor(player);
    }

    @Override
    protected void handle(int index) {
        if(index == 2){
            System.out.println("贾政处理了.......");
        }else{
            System.out.println("贾政传给下一个人.......");
            next(index);
        }
    }
}
